package com.sbdemo.dao;

import com.sbdemo.bean.TestBean;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

/**
 * Created by Administrator on 2017/3/7.
 */
public interface ITestDao extends CrudRepository<TestBean,Long>{

    @Modifying
    @Query("update TestBean t set t.name=?1,t.age=?2 where t.id=?3")
    public void update(String name,String age,Long id);
}
